package br.biofoco.p2p.peer;

import java.io.IOException;
import java.util.Collection;

import br.biofoco.p2p.rpc.EndPoint;
import br.biofoco.p2p.rpc.Protocol;
import br.biofoco.p2p.rpc.service.Messenger;

public interface PeerNode {

	ID getPeerID();
	
	Collection<EndPoint> getEndPoints();
	
	EndPoint getEndPoint(Protocol protocol);
	
	PeerConfig getPeerConfig();	
	
	void start() throws IOException;
	
	void stop() throws IOException;
	
	Messenger getMessenger();

	Collection<PeerNode> getPeerView();
		
}
